package com.my.createtype.singletion.staticstuff;

import com.my.createtype.singletion.staticstuff.InnerStaticClass.Holder;
import com.my.createtype.singletion.staticstuff.InnerStaticClass.StaticHolder;

public class Test {

	/** 
	 *  方法的简述. 
	 * <p> 方法的详细说明第一行<br> 
	 *  方法的详细说明第二行 
	 * @param 参数
	 * @exception 异常描述
	 * @return 没有返回值 
	 */

	public static void main(String[] args) {
		InnerStaticClass ss = new InnerStaticClass();
		
		/*StaticHolder sh = new StaticHolder();
		StaticHolder sh2 = new StaticHolder();
		System.out.println(sh == sh2);
		
		InnerStaticClass o = new InnerStaticClass();
		Holder h = o.new Holder();
		Holder h2 = o.new Holder();
		
		System.out.println(h == h2);*/
		
		/*// 这一种不依赖于外部类的实例化,但是会加载外部类
		InnerStaticClass.StaticHolder sh3 = new InnerStaticClass.StaticHolder();
		// 这一种和外部类木有关系
		StaticHolder sh4 = new StaticHolder();*/
		
		InnerStaticClass o2 = new InnerStaticClass();
		Holder h3 = o2.new Holder();
		Holder h4 = o2.new Holder();
		
		System.out.println(o2.i);
		System.out.println(InnerStaticClass.j);
	}

}
